package com.ssy.lingxi.search.service;

import com.ssy.lingxi.common.model.dto.UserLoginCacheDTO;
import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.search.api.model.request.SimpleIdListRequest;
import com.ssy.lingxi.search.model.response.BrowseRecordResponse;

/**
 * 浏览记录管理类
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/9/17
 */
public interface IBrowseRecordService {
    /**
     * 查询浏览记录
     */
    PageData<BrowseRecordResponse> getBrowseRecordList(UserLoginCacheDTO sysUser, Long shopId, int current, int pageSize);

    /**
     * 添加浏览记录
     * @param shopId
     * @param commodityId
     * @return
     */
    void saveBrowseRecord(UserLoginCacheDTO sysUser, Long shopId, Long commodityId);

    /**
     * 删除浏览记录
     * @param sysUser
     * @param shopId
     * @param simpleIdListRequest
     * @return
     */
    Boolean deleteBrowseRecord(UserLoginCacheDTO sysUser, Long shopId, SimpleIdListRequest simpleIdListRequest);

    /**
     * 清空浏览记录
     * @param sysUser
     * @param shopId
     * @return
     */
    Boolean clearBrowseRecord(UserLoginCacheDTO sysUser, Long shopId);
}
